package net.hn.hnms.biz.project.domain;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@ExcelIgnoreUnannotated
@EqualsAndHashCode(callSuper=false)
@Table(name = "contract_invoice", schema = "xmgl", catalog = "huaneng-manage")
public class ContractInvoice extends BaseModel implements Serializable {
    @ApiModelProperty(value = "id")
    @TableField(value = "contract_invoice_id", fill = FieldFill.INSERT)
    @TableId(type = IdType.ASSIGN_UUID)
    private String contractInvoiceId;

    @ApiModelProperty(value = "发票编号")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String invoiceCode;

    @ApiModelProperty(value = "开票单位")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String invoiceCompany;

    @ApiModelProperty(value = "发票类型（0增值税专用发票1普通发票2专业发票）")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String invoiceType;

    @ApiModelProperty(value = "发票金额")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private BigDecimal invoiceAmount;

    @ApiModelProperty(value = "开票时间")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    @JsonFormat(
            pattern = "yyyy-MM-dd"
    )
    private Date invoiceDate;

    @ApiModelProperty(value = "附件路径")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String invoiceFilePath;

    @ApiModelProperty(value = "附件名称")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String invoiceFileName;

    @ApiModelProperty(value = "合同ID")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String contractId;


    @ApiModelProperty(value = "0开票1收票")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String type;

    @ApiModelProperty(value = "ossId")
    @TableField(updateStrategy= FieldStrategy.IGNORED)
    private String ossId;


}
